package com.tubang.organization.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.tubang.component.entity.UserEntity;
import com.tubang.organization.entity.MenuEntity;
import com.tubang.organization.mapper.MenuMapper;
import com.tubang.organization.service.IMenuService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 菜单表 服务实现类
 * </p>
 *
 * @author wsl
 * @since 2017-11-30
 */
@Service
public class MenuServiceImpl extends ServiceImpl<MenuMapper, MenuEntity> implements IMenuService {

    @Override
    public List<MenuEntity> selectListByParentId(String id) {
        EntityWrapper<MenuEntity> entityWrapper = new EntityWrapper<MenuEntity>();
        entityWrapper.eq("parent_id", id);
        List<MenuEntity> menuEntities = selectList(entityWrapper);
        return menuEntities;
    }
}
